using Cookbook.Services.Core.Domain;

using FluentNHibernate.Automapping;
using FluentNHibernate.Automapping.Alterations;

namespace Cookbook.Services.Core.Persistency.MappingOverrides
{
    public class ProductMappingOverride : IAutoMappingOverride<Product>
    {
        public void Override(AutoMapping<Product> mapping)
        {
            mapping.Map(x => x.Name).Unique();
            mapping.Map(x => x.Code).Unique();
        }
    }
}